Commit 14d37d23 authored by Cole Neubauer's avatar Cole Neubauer
Browse files

Fixed Application Name not Appearing in Window Fixes #4731

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7692 41f8697f-d340-4b68-9986-7bafba869bb8
parent 218acad7
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -70,21 +70,20 @@ namespace Isis {
    #endif
  }


  Gui *Gui::Create(Isis::UserInterface &ui, int &argc, char *argv[]) {
    // Don't recreate
    if(p_gui != NULL) return p_gui;

    // Get preferences
    PvlGroup &uiPref = Preference::Preferences().findGroup("UserInterface");

    // Create the application
    new QApplication(argc, argv);
    // When QApplication is initialized, it will reset the locale to the shells locale. As a result
    // the locale needs to be reset after QApplications initialization.
    setlocale(LC_ALL, "en_US");
    QCoreApplication::setApplicationName(FileName(argv[0]).baseName());

    QApplication::setQuitOnLastWindowClosed(true);
    QApplication::setApplicationName(FileName(argv[0]).baseName());


    // Qt is smart enough to use the style of the system running the program.
@@ -94,7 +93,6 @@ namespace Isis {
      QString style = uiPref["GuiStyle"];
      QApplication::setStyle(style);
    }

    // Create the main window
    p_gui = new Gui(ui);
    p_gui->show();
@@ -107,6 +105,9 @@ namespace Isis {
    // Create the toolbar and menu and populate them with actions
    CreateAreas();

    // Set title
    QWidget::setWindowTitle(QApplication::applicationName());

    // Add parameters to the main area
    for(int group = 0; group < ui.NumGroups(); group++) {
      for(int param = 0; param < ui.NumParams(group); param++) {
@@ -141,6 +142,7 @@ namespace Isis {
    // Setup the current history pointer
    p_historyEntry = -1;


  }

  //! Destructor
+5 −3
Original line number Diff line number Diff line
@@ -81,6 +81,8 @@ namespace Isis {
   *                         retrieve lists from the history pvl.
   *  @history 2016-08-15 Adam Paquette - Reset locale after QApplication is
   *                         instantiated. Fixes #3908.
   *  @history 2017-05-16 Cole Neubauer - Fixed Title not showing in Putty/Xming
   *                         setup. Fixes #4731.
   */

  class Gui : public QMainWindow {