Commit 180eca0b authored by Jan Möbius's avatar Jan Möbius

Enable headless mode for meshinfo plugin

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13519 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ff405bda
......@@ -70,6 +70,8 @@
//== IMPLEMENTATION ==========================================================
void InfoMeshObjectPlugin::initializePlugin() {
if ( OpenFlipper::Options::gui()) {
infoBar_ = new InfoBar();
// Create info dialog
......@@ -77,6 +79,7 @@ void InfoMeshObjectPlugin::initializePlugin() {
// Set default pick mode in dialog box
info_->pickMode->setCurrentIndex(0); // PICK_FACES
}
}
/// initialize the plugin
......@@ -85,8 +88,10 @@ void InfoMeshObjectPlugin::pluginsInitialized() {
//set the slot descriptions
setDescriptions();
if ( OpenFlipper::Options::gui()) {
emit addWidgetToStatusbar(infoBar_);
infoBar_->hideCounts();
}
}
......@@ -740,6 +745,10 @@ bool InfoMeshObjectPlugin::getEdgeLengths(int _id, double &min, double &max, dou
void InfoMeshObjectPlugin::slotObjectUpdated( int /*_identifier*/ , const UpdateType& _type){
if ( !infoBar_ ) {
return;
}
if ( (PluginFunctions::objectCount() == 1) || (PluginFunctions::targetCount() == 1) ){
// This block is only interesting for topology changes
......@@ -747,10 +756,6 @@ void InfoMeshObjectPlugin::slotObjectUpdated( int /*_identifier*/ , const Update
return;
}
if ( !infoBar_ ) {
return;
}
bool found = false;
PluginFunctions::IteratorRestriction restriction;
......@@ -806,6 +811,7 @@ void InfoMeshObjectPlugin::slotObjectSelectionChanged( int _identifier ){
//------------------------------------------------------------------------------
void InfoMeshObjectPlugin::slotAllCleared(){
if ( infoBar_ )
infoBar_->hideCounts();
}
......
......@@ -102,6 +102,8 @@ class InfoMeshObjectPlugin : public QObject, BaseInterface, InformationInterface
void slotObjectSelectionChanged( int _identifier );
void slotAllCleared();
void noguiSupported( ) {} ;
// InformationInterface
void slotInformationRequested(const QPoint _clickedPoint, DataType _type);
DataType supportedDataTypes();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment