Display a window title when the viewer starts empty.

This commit is contained in:
Jean-Paul Chaput 2023-05-07 12:16:18 +02:00
parent abee13d669
commit 56883db08e
3 changed files with 3 additions and 2 deletions

View File

@ -584,7 +584,7 @@ namespace Hurricane {
void CellViewer::refreshTitle () void CellViewer::refreshTitle ()
{ {
QString cellName = "None"; QString cellName = "empty";
if ( getCell() ) if ( getCell() )
cellName = getString(getCell()->getName()).c_str(); cellName = getString(getCell()->getName()).c_str();

View File

@ -219,6 +219,7 @@ extern "C" {
} }
cw->setApplicationName ( name ); cw->setApplicationName ( name );
cw->refreshTitle ();
HCATCH HCATCH
Py_RETURN_NONE; Py_RETURN_NONE;

View File

@ -87,6 +87,7 @@ namespace Hurricane {
CellViewer ( QWidget* parent=NULL ); CellViewer ( QWidget* parent=NULL );
virtual ~CellViewer (); virtual ~CellViewer ();
inline bool isToolInterrupted () const; inline bool isToolInterrupted () const;
void refreshTitle ();
QMenu* createDebugMenu (); QMenu* createDebugMenu ();
bool hasMenu ( const QString& path ) const; bool hasMenu ( const QString& path ) const;
bool hasMenuAction ( const QString& path ) const; bool hasMenuAction ( const QString& path ) const;
@ -166,7 +167,6 @@ namespace Hurricane {
void cellPostModificated (); void cellPostModificated ();
protected: protected:
void createMenus (); void createMenus ();
void refreshTitle ();
void refreshHistory (); void refreshHistory ();
void rebuildHistory (); void rebuildHistory ();
private: private: