Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/NREL/OpenStudio into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
kbenne committed Mar 17, 2016
2 parents 39834f8 + 294e459 commit a586c40
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions openstudiocore/src/openstudio_lib/OSDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,6 @@ namespace openstudio {

connect(m_model.getImpl<model::detail::Model_Impl>().get(), &model::detail::Model_Impl::onChange, this, &OSDocument::markAsModified);

std::shared_ptr<OSDocument> currentDocument = app->currentDocument();
if (currentDocument && saveCurrentTabs){
m_startTabIndex = app->currentDocument()->verticalTabIndex();
m_startSubTabIndex = app->currentDocument()->subTabIndex();
}

// Main Right Column

m_mainRightColumnController = std::shared_ptr<MainRightColumnController>(new MainRightColumnController(m_model, m_resourcesPath));
Expand All @@ -480,10 +474,17 @@ namespace openstudio {
QTimer::singleShot(0, this, SLOT(markAsUnmodified()));
}

// There are (at least) two situations where setModel
// is called.
if (!m_tabButtonsCreated) {
// New OSDocument, setting model for the first time
m_tabButtonsCreated = true;
createTabButtons();
createTab(m_verticalId);
} else {
// Apply Measure Now has happened and we are reloading the model, but the document is not new
// We could and maybe should just create a new document on apply measure now.
onVerticalTabSelected(m_verticalId);
}

QTimer::singleShot(0, this, SLOT(initializeModel()));
Expand Down Expand Up @@ -1225,10 +1226,6 @@ namespace openstudio {

void OSDocument::onVerticalTabSelected(int verticalId)
{
openstudio::OSAppBase * app = OSAppBase::instance();
std::shared_ptr<OSDocument> currentDocument = app->currentDocument();
OS_ASSERT(currentDocument);

m_mainTabId = verticalId;

if (m_mainTabId != RUBY_SCRIPTS && m_mainRightColumnController->isMyModelTabHidden()){
Expand Down

4 comments on commit a586c40

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (kbenne) - x86_64-Linux-Ubuntu-14.04-clang-3.5: OK (2333 of 2395 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (kbenne) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (kbenne) - i386-Windows-7-VisualStudio-12: OK (2374 of 2395 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (kbenne) - Win64-Windows-7-VisualStudio-12: OK (2372 of 2395 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.