Project

General

Profile

Actions

Bug #1401

closed

WTableView::select issues when doing WServer->post on the selection

Added by Rob Van Dyck over 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
08/17/2012
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I have a scenario where I would like to do a selection of a row in a WTableView after the current action ends (*). I tried this using a WServer->post() on the selection.

In the attached code I have 2 tableviews where I add a row and then select the new row. One directly and one after a post. The post one doesn't work.

I'm using Wt 3.2.1.

Kind regards,

Rob.

*: I'm catching the clicked signal on an icon in a WStandardItem by overruling the WItemDelegate and doing something like this in the update method:

   WImage *image = dynamic_cast<WImage *>(result->find("i"));
   if (image) {
      image->clicked().connect(boost::bind(&page::item_delegate::icon_clicked, this, index.row(), index.column()));
   }

there I can do the appropriate action and select the item I want to select, but afterwards the selection is (re)set to the row that was just clicked. So that is why I wanted to post the selection. Any suggestion for a workaround?


Files

main.cpp (3.37 KB) main.cpp Rob Van Dyck, 08/17/2012 09:36 AM
Actions #1

Updated by Rob Van Dyck over 12 years ago

As a workaround I can apparantly also steal the clicked signal with 'image->clicked().preventPropagation();'. Perfect :).

Actions #2

Updated by Koen Deforche about 12 years ago

  • Status changed from New to Resolved

Hey Rob,

post() will not work because that requires enableUpdates() + triggerUpdate() ?

Regards,

koen

Actions #3

Updated by Rob Van Dyck about 12 years ago

ARRGH

You are right. Sorry for the inconvenience.

Regards,

Rob.

Actions #4

Updated by Koen Deforche about 12 years ago

  • Status changed from Resolved to Closed
  • Target version set to 3.2.3

Fixed in Wt 3.2.3 RC1.

Actions

Also available in: Atom PDF